<div class="row-fluid">
  <div class="span4 visible-desktop"></div>
  <div class="span4">
    <h1>Adding users</h1>
    <form ng-submit="addUser()" class="form-actions">
      <div>
        <label>Username</label>
        <input type="text" placeholder="Type name" ng-model="newuser.name">
      </div>
      <div>
        <label>Surname</label>
        <input type="text" placeholder="Type surname" ng-model="newuser.surname" required>
      </div>
      <div>
        <label>Age</label>
        <input type="number" placeholder="Type age" ng-model="newuser.age" required first-focus>
      </div>
      <div>
        <button class="btn btn-success btn-block" type="submit" first-focus>Add</button>
      </div>
    </form>
    <table class="table">
      <thead>
      <td>Name</td>
      <td>Surname</td>
      <td>Age</td>
      </thead>
      <tr ng-repeat="user in users">
        <td>{{user.name}}</td>
        <td>{{user.surname}}</td>
        <td>{{user.age}}</td>
        <td><button class="btn btn-small btn-danger" ng-click="delete(user.id)"><i class="icon-ban-circle icon-white"></i></button></td>
      </tr>
    </table>
    <div class="text-center">
      <button class="btn btn-success" ng-click="sendUsers()">Send</button>
    </div>
    <div ng-show="status == 'waiting'">
      <div>
        Waiting for reply...
      </div>
      <div class="progress progress-striped active">
        <div class="bar" style="width: 100%;"></div>
      </div>
    </div>
    <div ng-show="status == 'responded'">
      <div>This is response</div>
      <div>
        {{response}}
      </div>
    </div>
  </div>
  <div class="span4 visible-desktop"></div>
</div>

